<template>
  <div class="pagination">
    <el-pagination
      background
      layout="total,prev, pager, next,jumper"
      :page-size="pageSize"
      :total="total"
      @current-change="changeCurrent"
    >
    </el-pagination>
  </div>
</template>

<script>
export default {
  props: {
    pageSize: {
      type: Number,
      default: 1,
    },
    total: {
      type: Number,
      default: 10,
    },
  },
  methods: {
    changeCurrent(index) {
      this.$emit("changeCurrent", index);
    },
  },
};
</script>

<style lang="less" scoped>
.pagination {
  margin: 20px;
  text-align: center;
  .el-pagination {
    padding: 2px 5px 0;
  }
}
</style>